<?php
/**
 * Created by PhpStorm.
 * User: 戎大富
 * Date: 2018/8/3
 * Time: 10:30
 */
namespace app\api\model;
use think\Model;

class Banner extends Model {
    /**
     * 获取活动类型的名称
     * @param $activity_id 活动类型ID
     * @return mixed
     */
    public function selectBanner($field='*'){
        $res = $this->where('banner_status',1)->field($field)->order('banner_time desc')->limit(6)->select();
        return $res;
    }

    public function selectBannerOne($filed,$id){
        $res = $this->where('banner_id',$id)->field($filed)->find();
        return  $res;
    }
}